package com.project.controller;

import com.github.pagehelper.PageInfo;
import com.project.bean.UserBean;
import com.project.mapper.IUserMapper;
import com.project.service.IUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "用户测试接口")
@RequestMapping("user")
public class UserController {

    @Autowired
    private IUserService userService;

    @GetMapping("findByItem")
    @ApiOperation(value = "按用户名动态分页查询")
    public PageInfo<UserBean>findByItem(int page,int pageSize,String name){
        return userService.findByItem(page, pageSize, name);
    }
}
